StupidBeauty
Read times:1809Posted at: - no title specified

Qt5.4文档翻译:QLocale,QLocale Class

QLocale 可以 针对各种语言将数字和它们的字符串表达方式互相转换。 详细说明……

头文件:

#include <QLocale>

qmake指令

QT += core

注意 这个类中的所有函数都是 可重入的 ,只有一个例外 setDefault (),它不是可重入的。

详细说明

QLocale 可以 针对各种语言将数字和它们的字符串表达方式互相转换。

QLocale 是通过在构造函数中指定一个语言/国家代码对来初始化的, 它提供了与 QString 相类似的数字到字符串和字符串到数字的转换函数。

示例:

QLocale egyptian( QLocale ::Arabic, QLocale ::Egypt);

QString s1 = egyptian. toString (1.571429E+07, 'e');

QString s2 = egyptian. toString (10);

double d = egyptian. toDouble (s1);

int i = egyptian. toInt (s2);

QLocale 支持默认区域 的概念, 这个是在应用程序启动时通过系统的区域设置来确定的。默认区域 可通过调用静态成员函数 setDefault ()来改变。设置默认区域 ,会有以下效果:

  • •. 如果某个 QLocale 对象 是使用默认构造函数来构造的,那么, 它会使用默认区域的设置。

  • •. QString::toInt () QString::toDouble ()等等函数 会按照默认区域的设置来对字符串进行解释。如果解释失败, 则,会使用"C"区域作为后备。

  • •. QString::arg () ,在格式化数字 时,如果它的占位符 中包含一个'L'的话,例如"%L1",则,会使用默认区域来进行格式化。

以下示例,展示了如何直接使用 QLocale

QLocale :: setDefault ( QLocale ( QLocale ::Hebrew, QLocale ::Israel));

QLocale hebrew; // 构造 一个默认的 QLocale

QString s1 = hebrew. toString (15714.3, 'e');

bool ok;

double d;

QLocale :: setDefault ( QLocale ::C);

d = QString ("1234,56"). toDouble (&ok);   // ok == false

d = QString ("1234.56"). toDouble (&ok);   // ok == true, d == 1234.56

QLocale :: setDefault ( QLocale ::German);

d = QString ("1234,56"). toDouble (&ok);   // ok == true, d == 1234.56

d = QString ("1234.56"). toDouble (&ok);   // ok == true, d == 1234.56

QLocale :: setDefault ( QLocale ( QLocale ::English, QLocale ::UnitedStates));

str = QString ("%1 %L2 %L3")

.arg(12345).arg(12345).arg(12345, 0, 16);

// str == "12345 12,345 3039"

当妳在构造函数中指定语言/国家代码对的时候,可能发生以下三种情况中的一种:

  • •.如果在数据库中找到了对应的语言/国家代码对,则会使用它。

  • •. 如果找到 了所指定的语言,但未找到指定的国家,或者国家被指定为任意国家( AnyCountry ),则, 会使用该语言及对应的最适合的国家(例如,针对German 会使用 Germany)

  • •. 如果 既未找到语言也未找到国家,则, QLocale 会使用默认区域(参考 setDefault ())。

使用 language () country ()来确定实际使用的语言和国家值。

另一种构造 QLocale 对象的方法就是,指定区域名字。

QLocale korean("ko");

QLocale swiss("de_CH");

这个构造函数会将区域名字转换成语言/国家代码对;它不会使用系统的区域数据库。

注意 对于当前 的键盘输入区域,请参考 QInputMethod::locale ()。

QLocale 的数据基于通用区域数据仓库 24版(Common Locale Data Repository v24)。

参考 QString::arg () QString::toInt () QString::toDouble () QInputMethod::locale ()

成员类型文档

enum QLocale::Country

这个枚举类型是用来指定国家的。

常量

说明

QLocale::AnyCountry

0

QLocale::Afghanistan

1

QLocale::Albania

2

QLocale::Algeria

3

QLocale::AmericanSamoa

4

QLocale::Andorra

5

QLocale::Angola

6

QLocale::Anguilla

7

QLocale::Antarctica

8

QLocale::AntiguaAndBarbuda

9

QLocale::Argentina

10

QLocale::Armenia

11

QLocale::Aruba

12

QLocale::Australia

13

QLocale::Austria

14

QLocale::Azerbaijan

15

QLocale::Bahamas

16

QLocale::Bahrain

17

QLocale::Bangladesh

18

QLocale::Barbados

19

QLocale::Belarus

20

QLocale::Belgium

21

QLocale::Belize

22

QLocale::Benin

23

QLocale::Bermuda

24

QLocale::Bhutan

25

QLocale::Bolivia

26

QLocale::BosniaAndHerzegowina

27

QLocale::Botswana

28

QLocale::BouvetIsland

29

QLocale::Brazil

30

QLocale::BritishIndianOceanTerritory

31

QLocale::Brunei

32

QLocale::Bulgaria

33

QLocale::BurkinaFaso

34

QLocale::Burundi

35

QLocale::Cambodia

36

QLocale::Cameroon

37

QLocale::Canada

38

QLocale::CanaryIslands

238

QLocale::CapeVerde

39

QLocale::CaymanIslands

40

QLocale::CentralAfricanRepublic

41

QLocale::Chad

42

QLocale::Chile

43

QLocale::China

44

QLocale::ChristmasIsland

45

QLocale::ClippertonIsland

241

QLocale::CocosIslands

46

QLocale::Colombia

47

QLocale::Comoros

48

QLocale::CongoKinshasa

49

QLocale::CongoBrazzaville

50

QLocale::DemocraticRepublicOfCongo

CongoKinshasa

已废弃,请使用CongoKinshasa

QLocale::PeoplesRepublicOfCongo

CongoBrazzaville

已废弃,请使用CongoBrazzaville

QLocale::CookIslands

51

QLocale::CostaRica

52

QLocale::IvoryCoast

53

QLocale::Croatia

54

QLocale::Cuba

55

QLocale::Cyprus

56

QLocale::CzechRepublic

57

QLocale::Denmark

58

QLocale::Djibouti

59

QLocale::Dominica

60

QLocale::DominicanRepublic

61

QLocale::EastTimor

62

QLocale::Ecuador

63

QLocale::Egypt

64

QLocale::ElSalvador

65

QLocale::EquatorialGuinea

66

QLocale::Eritrea

67

QLocale::Estonia

68

QLocale::Ethiopia

69

QLocale::FalklandIslands

70

QLocale::FaroeIslands

71

QLocale::Fiji

72

QLocale::Finland

73

QLocale::France

74

QLocale::FrenchGuiana

76

QLocale::FrenchPolynesia

77

QLocale::FrenchSouthernTerritories

78

QLocale::Gabon

79

QLocale::Gambia

80

QLocale::Georgia

81

QLocale::Germany

82

QLocale::Ghana

83

QLocale::Gibraltar

84

QLocale::Greece

85

QLocale::Greenland

86

QLocale::Grenada

87

QLocale::Guadeloupe

88

QLocale::Guam

89

QLocale::Guatemala

90

QLocale::Guernsey

75

QLocale::Guinea

91

QLocale::GuineaBissau

92

QLocale::Guyana

93

QLocale::Haiti

94

QLocale::HeardAndMcDonaldIslands

95

QLocale::Honduras

96

QLocale::HongKong

97

QLocale::Hungary

98

QLocale::Iceland

99

QLocale::India

100

QLocale::Indonesia

101

QLocale::Iran

102

QLocale::Iraq

103

QLocale::Ireland

104

QLocale::Israel

105

QLocale::Italy

106

QLocale::Jamaica

107

QLocale::Japan

108

QLocale::Jordan

109

QLocale::Kazakhstan

110

QLocale::Kenya

111

QLocale::Kiribati

112

QLocale::NorthKorea

113

QLocale::SouthKorea

114

QLocale::DemocraticRepublicOfKorea

NorthKorea

已废弃,请使用NorthKorea

QLocale::RepublicOfKorea

SouthKorea

已废弃,请使用SouthKorea

QLocale::Kosovo

257

QLocale::Kuwait

115

QLocale::Kyrgyzstan

116

QLocale::Laos

117

QLocale::Latvia

118

QLocale::Lebanon

119

QLocale::Lesotho

120

QLocale::Liberia

121

QLocale::Libya

122

QLocale::Liechtenstein

123

QLocale::Lithuania

124

QLocale::Luxembourg

125

QLocale::Macau

126

QLocale::Macedonia

127

QLocale::Madagascar

128

QLocale::Malawi

129

QLocale::Malaysia

130

QLocale::Maldives

131

QLocale::Mali

132

QLocale::Malta

133

QLocale::MarshallIslands

134

QLocale::Martinique

135

QLocale::Mauritania

136

QLocale::Mauritius

137

QLocale::Mayotte

138

QLocale::Mexico

139

QLocale::Micronesia

140

QLocale::Moldova

141

QLocale::Monaco

142

QLocale::Mongolia

143

QLocale::Montserrat

144

QLocale::Morocco

145

QLocale::Mozambique

146

QLocale::Myanmar

147

QLocale::Namibia

148

QLocale::NauruCountry

149

QLocale::Nepal

150

QLocale::Netherlands

151

QLocale::NewCaledonia

153

QLocale::NewZealand

154

QLocale::Nicaragua

155

QLocale::Niger

156

QLocale::Nigeria

157

QLocale::Niue

158

QLocale::NorfolkIsland

159

QLocale::NorthernMarianaIslands

160

QLocale::Norway

161

QLocale::Oman

162

QLocale::Pakistan

163

QLocale::Palau

164

QLocale::PalestinianTerritories

165

QLocale::Panama

166

QLocale::PapuaNewGuinea

167

QLocale::Paraguay

168

QLocale::Peru

169

QLocale::Philippines

170

QLocale::Pitcairn

171

QLocale::Poland

172

QLocale::Portugal

173

QLocale::PuertoRico

174

QLocale::Qatar

175

QLocale::Reunion

176

QLocale::Romania

177

QLocale::Russia

178

与RussianFederation同义

QLocale::RussianFederation

Russia

与Russia同义

QLocale::Rwanda

179

QLocale::SaintKittsAndNevis

180

QLocale::SaintLucia

181

QLocale::SaintVincentAndTheGrenadines

182

QLocale::Samoa

183

QLocale::SanMarino

184

QLocale::SaoTomeAndPrincipe

185

QLocale::SaudiArabia

186

QLocale::Senegal

187

QLocale::Seychelles

188

QLocale::SierraLeone

189

QLocale::Singapore

190

QLocale::Slovakia

191

QLocale::Slovenia

192

QLocale::SolomonIslands

193

QLocale::Somalia

194

QLocale::SouthAfrica

195

QLocale::SouthGeorgiaAndTheSouthSandwichIslands

196

QLocale::Spain

197

QLocale::SriLanka

198

QLocale::SaintHelena

199

QLocale::SaintPierreAndMiquelon

200

QLocale::Sudan

201

QLocale::Suriname

202

QLocale::SvalbardAndJanMayenIslands

203

QLocale::Swaziland

204

QLocale::Sweden

205

QLocale::Switzerland

206

QLocale::Syria

207

QLocale::SyrianArabRepublic

Syria

已废弃,请使用Syria

QLocale::Taiwan

208

QLocale::Tajikistan

209

QLocale::Tanzania

210

QLocale::Thailand

211

QLocale::Togo

212

QLocale::Tokelau

213

QLocale::Tonga

214

QLocale::TrinidadAndTobago

215

QLocale::Tunisia

216

QLocale::Turkey

217

QLocale::Turkmenistan

218

QLocale::TurksAndCaicosIslands

219

QLocale::Tuvalu

220

QLocale::Uganda

221

QLocale::Ukraine

222

QLocale::UnitedArabEmirates

223

QLocale::UnitedKingdom

224

QLocale::UnitedStates

225

QLocale::UnitedStatesMinorOutlyingIslands

226

QLocale::Uruguay

227

QLocale::Uzbekistan

228

QLocale::Vanuatu

229

QLocale::VaticanCityState

230

QLocale::Venezuela

231

QLocale::Vietnam

232

QLocale::BritishVirginIslands

233

QLocale::UnitedStatesVirginIslands

234

QLocale::WallisAndFutunaIslands

235

QLocale::WesternSahara

236

QLocale::Yemen

237

QLocale::Zambia

239

QLocale::Zimbabwe

240

QLocale::Montenegro

242

QLocale::Serbia

243

QLocale::SaintBarthelemy

244

QLocale::SaintMartin

245

QLocale::LatinAmericaAndTheCaribbean

246

QLocale::AscensionIsland

247

QLocale::AlandIslands

248

QLocale::DiegoGarcia

249

QLocale::CeutaAndMelilla

250

QLocale::IsleOfMan

251

QLocale::Jersey

252

QLocale::TristanDaCunha

253

QLocale::SouthSudan

254

QLocale::CuraSao

152

QLocale::Bonaire

255

QLocale::SintMaarten

256

参考 country () countryToString ()

enum QLocale::Language

这个枚举类型是用来指定语言的。

常量

说明

QLocale::AnyLanguage

0

QLocale::C

1

"C"这个区域在行为上与English/ UnitedStates 等价。

QLocale::Abkhazian

2

QLocale::Oromo

3

QLocale::Afan

Oromo

已废弃,请使用Oromo

QLocale::Afar

4

QLocale::Afrikaans

5

QLocale::Akoose

312

自Qt 5.3开始引入

QLocale::Albanian

6

QLocale::Amharic

7

QLocale::Arabic

8

QLocale::Armenian

9

QLocale::Assamese

10

QLocale::Avaric

216

QLocale::Aymara

11

QLocale::Azerbaijani

12

QLocale::Bashkir

13

QLocale::Basque

14

QLocale::Bengali

15

QLocale::Dzongkha

16

QLocale::Bhutani

Dzongkha

已废弃,请使用Dzongkha

QLocale::Bihari

17

QLocale::Bislama

18

QLocale::Bosnian

142

QLocale::Bodo

215

QLocale::Breton

19

QLocale::Bulgarian

20

QLocale::Burmese

21

QLocale::Belarusian

22

QLocale::Byelorussian

Belarusian

已废弃,请使用Belarusian

QLocale::Khmer

23

QLocale::Cambodian

Khmer

已废弃,请使用Khmer

QLocale::Catalan

24

QLocale::Chamorro

217

QLocale::Chechen

218

QLocale::Chinese

25

QLocale::Church

219

QLocale::Chuvash

220

QLocale::Cornish

145

QLocale::Corsican

26

QLocale::Cree

221

QLocale::Croatian

27

QLocale::Czech

28

QLocale::Danish

29

QLocale::Divehi

143

QLocale::Dutch

30

QLocale::English

31

QLocale::Esperanto

32

QLocale::Estonian

33

QLocale::Faroese

34

QLocale::Fijian

35

QLocale::Finnish

36

QLocale::French

37

QLocale::WesternFrisian

38

与Frisian同义

QLocale::Frisian

WesternFrisian

与WesternFrisian同义

QLocale::Gaelic

39

QLocale::Galician

40

QLocale::Georgian

41

QLocale::German

42

QLocale::Greek

43

QLocale::Greenlandic

44

QLocale::Guarani

45

QLocale::Gujarati

46

QLocale::Haitian

222

QLocale::Hausa

47

QLocale::Hebrew

48

QLocale::Herero

223

QLocale::Hindi

49

QLocale::HiriMotu

224

QLocale::Hungarian

50

QLocale::Icelandic

51

QLocale::Indonesian

52

QLocale::Interlingua

53

QLocale::Interlingue

54

QLocale::Inuktitut

55

QLocale::Inupiak

56

QLocale::Irish

57

QLocale::Italian

58

QLocale::Japanese

59

QLocale::Javanese

60

QLocale::Kannada

61

QLocale::Kanuri

225

QLocale::Kashmiri

62

QLocale::Kazakh

63

QLocale::Kinyarwanda

64

QLocale::Kirghiz

65

QLocale::Komi

226

QLocale::Kongo

227

QLocale::Korean

66

QLocale::Kurdish

67

QLocale::Rundi

68

QLocale::Kurundi

Rundi

已废弃,请使用Rundi

QLocale::Kwanyama

228

QLocale::Lakota

313

自Qt 5.3开始引入

QLocale::Lao

69

QLocale::Latin

70

QLocale::Latvian

71

QLocale::Limburgish

229

QLocale::Lingala

72

QLocale::Lithuanian

73

QLocale::LubaKatanga

230

QLocale::Luxembourgish

231

QLocale::Marshallese

81

QLocale::Macedonian

74

QLocale::Malagasy

75

QLocale::Malay

76

QLocale::Malayalam

77

QLocale::Maltese

78

QLocale::Manx

144

QLocale::Maori

79

QLocale::Marathi

80

QLocale::Moldavian

Romanian

已废弃,请使用Romanian

QLocale::Mongolian

82

QLocale::NauruLanguage

83

QLocale::Navaho

232

QLocale::Ndonga

233

QLocale::Nepali

84

QLocale::Norwegian

NorwegianBokmal

与NorwegianBokmal同义

QLocale::NorwegianBokmal

85

与Norwegian同义

QLocale::NorwegianNynorsk

141

QLocale::Occitan

86

QLocale::Ojibwa

234

QLocale::Oriya

87

QLocale::Ossetic

101

QLocale::Pali

235

QLocale::Pashto

88

QLocale::Persian

89

QLocale::Polish

90

QLocale::Portuguese

91

QLocale::Punjabi

92

QLocale::Quechua

93

QLocale::Romansh

94

QLocale::RhaetoRomance

Romansh

已废弃,请使用Romansh

QLocale::Romanian

95

QLocale::Russian

96

QLocale::Samoan

97

QLocale::Sango

98

QLocale::Sanskrit

99

QLocale::Sardinian

115

QLocale::Serbian

100

QLocale::SerboCroatian

Serbian

已废弃,请使用Serbian

QLocale::SouthernSotho

102

QLocale::Tswana

103

QLocale::Shona

104

QLocale::Sindhi

105

QLocale::Sinhala

106

QLocale::Swati

107

QLocale::Slovak

108

QLocale::Slovenian

109

QLocale::Somali

110

QLocale::Spanish

111

QLocale::StandardMoroccanTamazight

314

自Qt 5.3开始引入

QLocale::Sundanese

112

QLocale::Swahili

113

QLocale::Swedish

114

QLocale::Tagalog

Filipino

已废弃,请使用Filipino

QLocale::Tahitian

127

QLocale::Tajik

116

QLocale::Tamil

117

QLocale::Tatar

118

QLocale::Telugu

119

QLocale::Thai

120

QLocale::Tibetan

121

QLocale::Tigrinya

122

QLocale::Tongan

123

QLocale::Tsonga

124

QLocale::Turkish

125

QLocale::Turkmen

126

QLocale::Twi

Akan

已废弃,请使用Akan

QLocale::Uighur

128

QLocale::Uigur

Uighur

已废弃,请使用Uighur

QLocale::Ukrainian

129

QLocale::Urdu

130

QLocale::Uzbek

131

QLocale::Vietnamese

132

QLocale::Volapuk

133

QLocale::Walloon

236

QLocale::Welsh

134

QLocale::Wolof

135

QLocale::Xhosa

136

QLocale::Yiddish

137

QLocale::Yoruba

138

QLocale::Zhuang

139

QLocale::Zulu

140

QLocale::Bosnian

142

QLocale::Divehi

143

QLocale::Manx

144

QLocale::Cornish

145

QLocale::Akan

146

QLocale::Konkani

147

QLocale::Ga

148

QLocale::Igbo

149

QLocale::Kamba

150

QLocale::Syriac

151

QLocale::Blin

152

QLocale::Geez

153

QLocale::Koro

154

QLocale::Sidamo

155

QLocale::Atsam

156

QLocale::Tigre

157

QLocale::Jju

158

QLocale::Friulian

159

QLocale::Venda

160

QLocale::Ewe

161

QLocale::Walamo

162

QLocale::Hawaiian

163

QLocale::Tyap

164

QLocale::Nyanja

165

QLocale::Chewa

Nyanja

已废弃,请使用Nyanja

QLocale::Filipino

166

QLocale::SwissGerman

167

QLocale::SichuanYi

168

QLocale::Kpelle

169

QLocale::LowGerman

170

QLocale::SouthNdebele

171

QLocale::NorthernSotho

172

QLocale::NorthernSami

173

QLocale::Taroko

174

QLocale::Gusii

175

QLocale::Taita

176

QLocale::Fulah

177

QLocale::Kikuyu

178

QLocale::Samburu

179

QLocale::Sena

180

QLocale::NorthNdebele

181

QLocale::Rombo

182

QLocale::Tachelhit

183

QLocale::Kabyle

184

QLocale::Nyankole

185

QLocale::Bena

186

QLocale::Vunjo

187

QLocale::Bambara

188

QLocale::Embu

189

QLocale::Cherokee

190

QLocale::Morisyen

191

QLocale::Makonde

192

QLocale::Langi

193

QLocale::Ganda

194

QLocale::Bemba

195

QLocale::Kabuverdianu

196

QLocale::Meru

197

QLocale::Kalenjin

198

QLocale::Nama

199

QLocale::Machame

200

QLocale::Colognian

201

QLocale::Masai

202

QLocale::Soga

203

QLocale::Luyia

204

QLocale::Asu

205

QLocale::Teso

206

QLocale::Saho

207

QLocale::KoyraChiini

208

QLocale::Rwa

209

QLocale::Luo

210

QLocale::Chiga

211

QLocale::CentralMoroccoTamazight

212

QLocale::KoyraboroSenni

213

QLocale::Shambala

214

QLocale::Aghem

237

QLocale::Basaa

238

QLocale::Zarma

239

QLocale::Duala

240

QLocale::JolaFonyi

241

QLocale::Ewondo

242

QLocale::Bafia

243

QLocale::MakhuwaMeetto

244

QLocale::Mundang

245

QLocale::Kwasio

246

QLocale::Nuer

247

QLocale::Sakha

248

QLocale::Sangu

249

QLocale::CongoSwahili

250

QLocale::Tasawaq

251

QLocale::Vai

252

QLocale::Walser

253

QLocale::Yangben

254

QLocale::Avestan

255

QLocale::Asturian

256

QLocale::Ngomba

257

QLocale::Kako

258

QLocale::Meta

259

QLocale::Ngiemboon

260

QLocale::Aragonese

261

QLocale::Akkadian

262

QLocale::AncientEgyptian

263

QLocale::AncientGreek

264

QLocale::Aramaic

265

QLocale::Balinese

266

QLocale::Bamun

267

QLocale::BatakToba

268

QLocale::Buginese

269

QLocale::Buhid

270

QLocale::Carian

271

QLocale::Chakma

272

QLocale::ClassicalMandaic

273

QLocale::Coptic

274

QLocale::Dogri

275

QLocale::EasternCham

276

QLocale::EasternKayah

277

QLocale::Etruscan

278

QLocale::Gothic

279

QLocale::Hanunoo

280

QLocale::Ingush

281

QLocale::LargeFloweryMiao

282

QLocale::Lepcha

283

QLocale::Limbu

284

QLocale::Lisu

285

QLocale::Lu

286

QLocale::Lycian

287

QLocale::Lydian

288

QLocale::Mandingo

289

QLocale::Manipuri

290

QLocale::Meroitic

291

QLocale::NorthernThai

292

QLocale::OldIrish

293

QLocale::OldNorse

294

QLocale::OldPersian

295

QLocale::OldTurkish

296

QLocale::Pahlavi

297

QLocale::Parthian

298

QLocale::Phoenician

299

QLocale::PrakritLanguage

300

QLocale::Rejang

301

QLocale::Sabaean

302

QLocale::Samaritan

303

QLocale::Santali

304

QLocale::Saurashtra

305

QLocale::Sora

306

QLocale::Sylheti

307

QLocale::Tagbanwa

308

QLocale::TaiDam

309

QLocale::TaiNua

310

QLocale::Ugaritic

311

参考 language () languageToString ()

enum QLocale::Script

这个枚举类型是用来指定手写体的。

常量

说明

QLocale::AnyScript

0

QLocale::ArabicScript

1

QLocale::ArmenianScript

10

QLocale::AvestanScript

36

QLocale::BalineseScript

37

QLocale::BamumScript

38

QLocale::BatakScript

39

QLocale::BengaliScript

11

QLocale::BopomofoScript

40

QLocale::BrahmiScript

41

QLocale::BrailleScript

103

QLocale::BugineseScript

42

QLocale::BuhidScript

43

QLocale::CanadianAboriginalScript

44

QLocale::CarianScript

45

QLocale::ChakmaScript

46

QLocale::ChamScript

47

QLocale::CherokeeScript

12

QLocale::CopticScript

48

QLocale::CypriotScript

49

QLocale::CyrillicScript

2

QLocale::DeseretScript

3

QLocale::DevanagariScript

13

QLocale::EgyptianHieroglyphsScript

50

QLocale::EthiopicScript

14

QLocale::FraserScript

51

QLocale::GeorgianScript

15

QLocale::GlagoliticScript

52

QLocale::GothicScript

53

QLocale::GreekScript

16

QLocale::GujaratiScript

17

QLocale::GurmukhiScript

4

QLocale::HanScript

54

QLocale::HangulScript

55

QLocale::HanunooScript

56

QLocale::HebrewScript

18

QLocale::HiraganaScript

104

QLocale::ImperialAramaicScript

57

QLocale::InscriptionalPahlaviScript

58

QLocale::InscriptionalParthianScript

59

QLocale::JapaneseScript

19

QLocale::JavaneseScript

60

QLocale::KaithiScript

61

QLocale::KannadaScript

21

QLocale::KatakanaScript

62

QLocale::KayahLiScript

63

QLocale::KharoshthiScript

64

QLocale::KhmerScript

20

QLocale::KoreanScript

22

QLocale::LannaScript

65

QLocale::LaoScript

23

QLocale::LatinScript

7

QLocale::LepchaScript

66

QLocale::LimbuScript

67

QLocale::LinearBScript

68

QLocale::LycianScript

69

QLocale::LydianScript

70

QLocale::MalayalamScript

24

QLocale::MandaeanScript

71

QLocale::MeiteiMayekScript

72

QLocale::MeroiticScript

73

QLocale::MeroiticCursiveScript

74

QLocale::MongolianScript

8

QLocale::MyanmarScript

25

QLocale::NkoScript

75

QLocale::NewTaiLueScript

76

QLocale::OghamScript

77

QLocale::OlChikiScript

78

QLocale::OldItalicScript

79

QLocale::OldPersianScript

80

QLocale::OldSouthArabianScript

81

QLocale::OriyaScript

26

QLocale::OrkhonScript

82

QLocale::OsmanyaScript

83

QLocale::PhagsPaScript

84

QLocale::PhoenicianScript

85

QLocale::PollardPhoneticScript

86

QLocale::RejangScript

87

QLocale::RunicScript

88

QLocale::SamaritanScript

89

QLocale::SaurashtraScript

90

QLocale::SharadaScript

91

QLocale::ShavianScript

92

QLocale::SimplifiedHanScript

5

与SimplifiedChineseScript同义

QLocale::SimplifiedChineseScript

SimplifiedHanScript

与SimplifiedHanScript同义

QLocale::SinhalaScript

32

QLocale::SoraSompengScript

93

QLocale::CuneiformScript

94

QLocale::SundaneseScript

95

QLocale::SylotiNagriScript

96

QLocale::SyriacScript

33

QLocale::TagalogScript

97

QLocale::TagbanwaScript

98

QLocale::TaiLeScript

99

QLocale::TaiVietScript

100

QLocale::TakriScript

101

QLocale::TamilScript

27

QLocale::TeluguScript

28

QLocale::ThaanaScript

29

QLocale::ThaiScript

30

QLocale::TibetanScript

31

QLocale::TifinaghScript

9

QLocale::TraditionalHanScript

6

与TraditionalChineseScript同义

QLocale::TraditionalChineseScript

TraditionalHanScript

与TraditionalHanScript同义

QLocale::UgariticScript

102

QLocale::VaiScript

35

QLocale::YiScript

34

参考 script () scriptToString () languageToString ()

成员函数文档

QString  QLocale:: name () const

以"language_country"(“语言_国家”)的形式返回此区域的语言和国家字符串,其中,语言是小写的、两个字母的ISO 639 语言代码,而国家是大写的、两个或三个字母的ISO 3166 国家代码。

注意 ,即使在构造 QLocale 对象的过程中使用了一个显式设置的手写体值,出于兼容 性方面的原因,name()也不会包含该值。如果 妳想要获取一个完整的区域名字,则使用 bcp47Name ()。

参考 QLocale () language () script () country () bcp47Name ()

[static] QLocale  QLocale:: system ()

返回 一个以系统的区域为基础进行初始化的 QLocale 对象。

WindowsMac系统上,这个区域会使用系统设置面板中指定的十进制/数字分割字符和日期/时间格式。

参考 c ()

战斗机

眼镜蛇导弹

巧慧

Your opinions
Your name:Email:Website url:Opinion content:
- no title specified

HxLauncher: Launch Android applications by voice commands

 
Recent comments
2017年4月~2019年4月垃圾短信排行榜Posted at:Thu Sep 26 04:51:48 2024
Qt5.7文档翻译:QWebEngineCookieStore类,QWebEngineCookieStore ClassPosted at:Fri Aug 11 06:50:35 2023盲盒kill -9 18289 Grebe.20230517.211749.552.mp4